Problem5 changed