added comments above functions