moved everything into GREATx.py. it works, but main is very messy and needs to be factored