make session optional