fixed result calculation