better connection handling
tidyup
name change