added sessions functionality