refactored to composite