re-implemented arrive.js
updated doc