finally fix the flip issue by using append?