updated test file to cover nested references