implement service layer for rank app