added composite sytructure logic