added session feature
saving data on close