updated documentation and added form validation