implemented front-end of graph page