Added each with length parameter