Students' gender-related choices and achievement in physics