cleanup main into functions
turn off retard checks