implemented F_5 algorithm, but doesn't work correctly