more univeral abstraction of in/out