executed when a client connects
moved up a package level