adding reward and error states