add result code checking to check target