made a legend, wrote some tests for ptI