Loop cutsetting added. Still buggy though