fancier method for less lag