Added comments in functions