code is currently organized as one function per file and would benefit from being organized in a more pythonic way