Javascript in implementation