additional comments added to function