some more work done... not compiling at this stage