Path-finding algorithm added