Added code for selection testing