corrections pointed out by Casper and Kenneth
using single in and out rules, as it is easier to explain in the paper.