replacing Delay() with vTaskDelay()