working on cleaning up somme of the code, and getting the automatic
return to work