adding markup attaching and connecting