removed call to freeram function