refactor and remove some useless code
refactor models seen code