add some code for study purpose