fix and refactor darning