More comments explaining the functions