implemented a stack for managing the child processess. tomorrow have to spawn off a thread for reading input.