added comments for functions