using replace to reduce some object variables