Added Write API

Added Write API