Added some code for passing current guard cells