made grid clickable and dynamic