added comments for the function of the functions