functions showCode and showView added