working on seesion to manage previous records