refactoring of the etl process and some model changes