adding encrypt method