addressed comments in order to clarify code