cosmetic changes
reshuffling code to better reflect logic
wip, defining new interface