Calculating several values at once