#22. Refactor update data algorithms