changed nonce function to be non-static; made static load_data function