added functions to retrive form data