return documents as well
build js