Defined ack funtion