merged  vanilla with legacy