revised model factories and tests