set up function pointer for send_response based on required action