rank result order - fixed

1. adding func to organize rank of returned results
2. adding test to fuisionLogic testing the new addon