select: converted a function