finishing up logic
basic functions done
refactor logic and control flow