combined JS with latest changes