added saving robotCount