bugs fixed -c mode
removed old code