Adds select function.