refactoring, removing useless code.