Changed model and added new tests