fixed a hw problem