Added cut function with DC. Fixed bugs