updated main
removed advanced
refactored code