Added comments for second function