added solve with tests