basic previous(key) functionality