finish the code inout