more tests; several functions reworked to make better use of series