first try of encryption functions