added optional sessionID handling.