make function parameters backwards compatible and return session_index in session_info