implemented comparable, compareTo, changed equals