update design document

update design document based on the new code