added comparison error functionality