added makeSelection function