adding Connection Function