added a second safety thread that stops motors every second