working on encrypt method