moved robofocus routines into main program