adding functionality to grid