major changes
heavy refactor