added buffer for input events