lot of refactoring
better code quality