handle input flags