Slightly changed methods writing final results.