work in progress. Feedback is welcome.