moved factoring functions to utility
super improved code base
last fixes
adding require