resolved and renamed scoping issue on connect thanks to @tdicola