implemented corrected teachman's index