end cases and other small things