fixed solution for set 2