WIP
optional: encode validity in pointer, remove helper class, generalize chaining