functions that come in handy along the way