completed and add a new method to compare