Memory optimization

Memory is optimized