modified decipher and added space char