added failure check for learn method