added connect function to schema