more migrating from coffeescript to js