path finding stuff previously done