substituted cell array access with local variables for considerable speedup.