Update input logic