reorganized function order and commented out submit function