code snippet fix