added messages and malloc except for function pointers