updated and consolidated resume logic