changed the return type of the connection methods to boolean