added legacy mode flag