grouped functions.  added comments