more work on editing - now somewhat functional