tested simplified model, still needs refactoring