added code snippet for testing method