changed some variable naming and spacing conventions