added comments / formatting