The development of cognitive flexibility in early childhood