Modifications. Added comments