free memory changed to long