add encrypt& decrypt functions