reimplemented data sink and most functions on SF
finished with reimplementation; tests still missing
updated todo