encryption and decryption now work correctly
project refactor