ack logic