adds host name and refactors plotting