clean up main
simplify