Added comments for the overall description of what the 2 functions do