using objects instead of primitives