added decrypt function