updated with my changes from original text-app