An intelligent tutoring system approach to teaching primary mathematics