added gridop code