A versatile and convenient method for the synthesis of substituted benzo[a]carbazoles and pyrido[2,3-a]carbazoles