serialisation function as module level constant