implement code snippet widget