add retain an object function