improve input behavior