Comments modified to clarify function objectives