code for Crypto serial study