adding shared object in view