adding decrypt function