Minor code fix
Code refactor to remove duplicate object creation
Code refactor to remove duplicate object creation