small speed up. still needs work