removed console logs + added better code documentation + applied revised ranking function