selection function is in an external file