refactored based on various github dotfiles