modified my_operator to check for errors
consolidated tests