updated code to reduce the number of concurrent jobs