add some if statements, clean up random other areas