example JS for models