fixed bug.  buffer should be char[] not char*[]