fixLength method