modified js version.