comparisson functions and small other stuff