initial version of selection analysis