moving handlers into ConnectionManager