finish input