Implementing anonymous type select