updated solution with new stuff.