fixed the code that chooses which cell has just clicked