added team controller and fixed what was causing json exceptions