add sub function
fix confilect