added session functionality