initial grid maintainance for traversal