migrate to coffeescript