Converted Coffee to JS