added and if-else block for incoming Responses