implement Run Length method