sorting algorithm, peeps and categories line in events index (fixing the positioning now)