starting major refactoring
major refactoring done