added clickable grid functionality