runs and writes