(BUILD BROKEN) wip writing data after function