added code for getting icon at a grid index