refactored sharedObjected