testing based on sample code