made clicking on cells change their state