fix rank by sorting students as array and add team filter