added main javascript