added some adapter stuff, and another pattern