change javascript to coffeescript
fix for displaying correct number of classes