new file:   apply_orientation.py