move serialisation at storage level, refactor accordingly