sample code and resource for study