we got form errors. still need to refactor and make this code a little more functional.