refactor installation of grafana