function and I/O lesson