fixes for issues 1-8