problem and solution modified
before merging