added models annotation. refactoring legacy code