removed use of cmp()