refactoring to more clear model