first attempt at de-duplication code: slurp.py