updated JS with primitives