Converted coffee to js