minor changes

slight generalization, template for Q5