added in new coffeescript, totally refactored