grid method