response rebuild to handle different responses