uses code as field in the State serializer and in the url