refactoring unnecessary functions..