final code, results