converted module to javascript to remove coffeescript dependency