ranking system refactored into module