Iteration over tan(beta) (outer variable)  added