a little refactoring
authority data writing correctly