changed some variable names to be more descriptive. added one comment line