add variables for shape/state count, add return statement to getMostCommon()