remove a lot of things
and refactoring the code