merged both solutions