improved input management