Updated old example to work with new object system