added comments per function