updated so simulation threads work for development purposes, not pretty but works