adjust deprecated api to the removed methods