improving condition comparison functions