Add functions to compare two objects attributes