add mode7 support