Modification for SO examples

http://stackoverflow.com/q/22280392/436028