improved debug message
added ply calculator example