added session checks