delete needless function and variable