attempting to reduce memory usage