fixed encryption, major testing required