changes to ex1, still a bug somewhere