turn markWords and annotateWords to working code