move slurp to a function