small fix; moved processinput to document