brought code up to date