-first version of more generic model parameter optimization functions