Providing a foundation for teaching mathematics in the middle grades