prelimnary work, doesn't compile (but i know why...)