new easier code
Merged