work in progress; a second version can be seen here