added prev, curr and next dates and logic