Added comments for the two functions