Slight change to use coffeescript if syntax