Update: Tested the code, working fine