example of monkey patching for Stackoverflow question 19588622