using find instead of next for finding the input fields

works in more cases and assumes less about the structure of the html