version with full inner product calculation