added decrypt funciton