First version of working glitch prediction