forgot to include stdlib for malloc