implemented mkContract