Added more comments

More comments describing what the function does