fixed up example code