added threading
reading
writing
example