post fix bug and add function