Added code modifications based on the requirements for PAN