add debug to learning