fix a bug and add some build in functions