concatenated everything into one script; lots of little changes