added instancing support, will refine later