need to implement findpath algorithm