working on test connection function