organize code to use with PyChram