refactoring
working