js converted to coffee closes #2