new grid logic; add some functions for finding candidates