made it into a python module