added new support for plotting mode