complete frame class & fix fileencoding