added main loop game