fix compile error, redefinition function, renamed second function