added remove action. Also only works with emacs 24