refactor models seen code