Add condition to final exercise and simplify everything