The two functions with comments