added select function