add setup and loop functions