Added onError method by M. Grigorov suggestion
added different operator overloading methods
update by M. Grigorov suggestions