add function for checking existence of coordinate in closed list
refactored run method but need to refactor valid location function with walls