Did you try running my code snippet? Is it working fine?