remove debugging stuff
rename variables to make more sense