Move success response function into own variable