Added create_object function.