all code was refactored