compare correctly