added full in/out support