added zsorting for players