fixing error in object declaration