tweaking example code