Tweak code snippet