Implemented grid selection with mouse