add device handling, change emacs config