#22. Refactor update data algorithms
- add necessary assertions