added comments fo functions