returns final result