commit 4 sv 3/13/13

added write function.