removed decorators and refactor code