added function to execute multiple tasks