reordered javascript
adding new rows with amount 1