fixes gate constructors
adds setInput functionality