added missing length argument