Added Main Loop