Thanks for all of the help and suggestions! Based on some research, reviewing loop basics, and working with the code, I came up with the following function to calculate the mode. It's still rough - I need to format the output, hide some of the info I've been displaying for debugging purposes...