wrote script of solution