tweaked solution