clearer implementation of EI_empirical