Measuring gender differences in cognitive functioning