Added simple prediction with limit on frames.