change -1 to ErrorReturn