add limit option, refactor html form