replaced some code specific to my cluster with a more generic version