improve path finder and move action ( needs refactoring and optimization )