moved from coffee to js