original code for SCW and CAVE workshops