added method to create responses from http returns