updated ArrayList class and fixed compareTo method in Client class