add contract and purpose

update the existing function