Note on the previous code (ver1.0)