Change so that this code can run directly on the cluster