update contract size method