added function for session route