refactored to pass in values including hidden fields
updated tests
changed head comment