removed malloc