encrypting was done in the wrong order. Fixed now