more work on counted ranges appendix