removed unused code and refactor code