added command line options to change selection function