improved scalajs 1