It feels a bit weird to modify the bounds here... is this a ruby object or a java object? Feels weird to modify it and then check for x/y. 

Reading this code I wonder of the sideeffect may lead to a repositioning or something...