Explain the factors to consider when planning a safe, but challenging environment for children.