removed malloc casts!