fixing recursive assignment