finish models and defs