- updated writer to make it work with numeric values
- added tests