Completed basic i/o contol