added several lines back in