fixed bug in get_major_axis
wrote test_major_axis as diagnostic tool...