implemented grammar into app