removed console logging and extraneous comments