changed variable / method names and added main thread blocks