nearly there, really. just need a few bits...