added in examples and changed to spawn so the process continues to run