encrypt method added