started to refactor everything