added return value to pergeObject