added comments for funtions