refactor modelTest