working on catching errors in frame-generator