better javascript api