Added cut function.