finish the io layer