wrote a function to check custer sizes and fixed somethings with the fix_l function