malloc efficiency fixed