adding code snippet