writing core in twoproc style