updated to deal with model creation and to fix bugs with population and precondition creation