added comments for needed functions