Added more explanation for the two functions