Renamed length to magnitude