editted comments for function