completed something about function