You don't actually want to use `return` here, just a `res` by itself.  The last statement's value in a Ruby method becomes the return value for that method.  I would add a blank line though above this line to offset it from rest of the method so the return value stands out.