Changed syntax, hopefully is more Ruby-correct