write design doc