minor revisions to multiple functions