change interface and fix compilation error