Switching to fork instead of spawn to allow for message passing