optimized dijsktra search
resolve merge conflict
jslinted code