renamed script to make it testable
reformat with pycharm