added nicer connection API