Learning through teaching: factors influencing teachers' mathematics knowledge