bug fix,maintenance,remove unused variables