add medium-frame function