destroy patch, code still needs refactor