optimise select method