ranking engine made in angular.js