implemented component pattern