defined method connect as static