adding pthread and malloc headers