write solution