major refactoring done
major refactor