added missing parens in buffer allocation (caused seg violation)