Max&Rich: adding when clause to start session