split data-manipulation into separate module, away from read-only queries