added better example js including options