updated encrypt