made inputs and generators closeable