adding some changes that didn't make it into the last commit