added useful comments
more parsing
refactor form and fix API request