added decrypt functionality