added dynamic method to obtain connections