add max window calculation for children