fixed issue in subset solution