added single_select() function