begin sec 3
refactor stuff