recursive optimize support