fixing tests and models