Changed extraction function and reordered to paper format