anchor.diff:  init([ Port ]) ->
   	io:format("Starting api on port ~p~n", [ Port ]),
   	{ ok, Socket } = gen_udp:open(Port,[ binary, { active, true }]),
  -	{ ok, #api{ socket = Socket, rooms = [] } }.
  +	{ ok, Super } = urelay_room_supervisor:start_link(),
  +	{ ok, #api{ socket = Socket, rooms = [], supervisor = Super } }.
   
   handle_call(stop,_From,API) ->
   	{ stop, ok, API };
  
positive.code: 	io:format("Got cast ~p~n", [ Message ]),
  	{ noreply, API }.
  
  handle_info({ udp, _Client, IPAddr, Port, Packet }, API = #api{ socket = Socket }) ->
  	io:format("Got packet ~p~n", [ Packet ]),
  	{ Command, Rem } = ujson:decode(Packet),
  	io:format("Got command ~p from ~p:~p ~n", [ Command, IPAddr, Port ]),
  	dispatch(Socket,IPAddr,Port,Command),
  	{ noreply, API };
  
  handle_info(Message,API) ->
  	io:format("Got message ~p~n", [ Message ]),
  
negative.code: code_change(_Old,_Vsn,API) ->
  	{ ok, API }.
  
  dispatch(API = #api{ supervisor = Super, rooms = Rooms, socket = Socket },IPAddr,Port,[ Command | Args ]) ->
  	case Command of
  		"start" -> 
  			[ RoomName, RoomPort ] = Args,
  			urelay_room_supervisor:start_room(Super,RoomName,RoomPort),
  			gen_udp:send(Socket,IPAddr,Port, ujson:encode([ "started", RoomName ])),	
  			{ noreply, API#api{ rooms = [ RoomName | Rooms ] }};
  		"stop" -> 
  			[ RoomName ] = Args,
  			urelay_room_supervisor:stop_room(Super,RoomName),
  			gen_udp:send(Socket,IPAddr,Port, ujson:encode([ "stoped", RoomName ])),	
  			{ noreply, API#api{ rooms = lists:delete(RoomName,Rooms) }};
  		"rooms" -> 
  			gen_udp:send(Socket,IPAddr,Port, ujson:encode([ "rooms", Rooms ])),	
  			{ noreply, API };
  		_ -> 
  			io:format("unknown command ~p~n", [ Command ]),
  			{ noreply, API }
  	end.
  