removed the static value for length parameter in adapter.