more sophisticated sample
typo fix
some cleanup