js work for loading main