working on encrypt function.