decryption working w/ few bugs