wrote solver