translated coffee to js