started adding logic to worksheet controller