improve input. now im using polling instead of events