added check for new connection