update the way we generate user interface and graph type