changed connect var to 1 or 0