The purposes of pre-trial detention and the quest for alternatives