fix code snippet