Added selection function.