accidentally commited only parts before -- now: removed console logs + added better code documentation + applied revised ranking function