Adding write functions
Use API in demo
README