Adding additional code from Mandeepak
Adding additional code from Mandeepak