start loop functions