improves memory allocation