bug fixed and add function .