rewritten input management