adding new inputlistener logic