Fixed up code with Eric