Teacher and instructional characteristics related to students' gains in flexibility