added methods to generate a frame