Initial implementations of IN and OUT.