added code snippet for issue 272