added select functionality