added function to find complete cases; typo corrected