added main files for either end