update comment and add contract for init method.