Rewrite in livescript