removed redundant malloc definitions