reduce memory using