committing changes to working ack function.