correcting dired to be called by interactive function