changed solution structure