trying to make some performance improvements