revised for vim-R