working out an issue with coffeescript