Added select method with its tests