fixed tests for building model