modified for emacs