added functionality to relate join form data properly