learn by modifing the default sample code