almost there, just a bit of debugging