Added multi-resource support