clean up a major bottleneck with feature generation
no need to set these every time, make them state vars