added boolean for success to substitute and adjoin
removed errors from both methods, when operation was not possible