flatmap plan