better buffer navigation stolen from josh