compairator implamented