legendre factory now working, added test data