implement IODevice function