refactored some stuff to make more sense
started on python module