pushed changes to code

reviewed kevins code and added some variable fixes