now getting previous data working on session part