adjusted the link between resourceneed and resourceallocation