refactoring unnecessary codes..