wal: add newWal helper func