add write function to proxy