how to make a functional new object