huge improvements to performance