removed testing code, added main controller