Preliminary code to run grid cells through network