some new code for array length