refactor package and model