included hsm encryption in the existing code