added main sections
refactoring