made the syntax more like the original ruby version