Optimizing practice through self-testing