move to a class file
add debug statement at top of write method to know i am hitting it
add outputter to write method