Rewrote slurp in ruby on a more readable way