further optimze memory usage on endpoint