update functions

- add function to replace a string in ontology source file
- fix little bugs