Updated to handle ack