rename state to parentState