added in ack  and nack functions