changed the Instance class to hold the corresponding model as well