Redid space numbering, deprecated determine_direction