main structure refactored, implementing Task 2