added callbacks and stuff - connectivity not quite working