migrated over to coffeescript