added session persistence