reduced memory usage. for real this time