utility to serialize variable paths + test