use save-excursion and char-after to cleanup code from my last commit