removed js code and started using coffescript