finished encryption and decryption functions, but I need Paul's help for the rest