added borderStyle argument to writeData