complety refactored
in the work