updated code for starcluster simulations