working web and cmd line mode