optimize the connection and secure a little more