added loop functions to toolbar