add function documentation
ai spawning functions and config file