second js api attempt failed (too complicated), I'll create an easy api
nice js api draft