change previous to prev