A star algorithm works properly and make the trace correctly