add handling of rapid input