A demonstration for a stackoverflow question