revisted several solutions