added if-statement for two objects not the same