added session managment