finish coffeescript conversion