basic libs for grid traversal