implement select method